package sidecar

import "time"

type sidecar struct {
	serverServiceFlag bool
	ss                *serverService
	clientFlag        bool
	client            *client
	rs                registerServer
}

var sc sidecar

func initSidecar() {
	
}

func respCallback(r *requestMsg) {
	sc.ss.writeResponseToClient(r)
}

func receiveResponse() *requestMsg {
	return <-sc.ss.requestChan
}

func sendRequest(r *requestMsg) {
	if r.semaphore == nil {
		r.semaphore = make(chan bool)
	}
	sc.client.sendMsgChan <- r
	select {
	case <-r.semaphore:

	case <-time.After(time.Minute):
		
	}

}
